<?php echo '<?xml version="1.0"';?> encoding="<?php echo isset($feed['encoding']) ? $feed['encoding'] : DEFAULT_CHARSET ?>" standalone="yes"?>
<gallery>
<?php
	if ( is_array($albums) && count($albums) > 0 )
	{
		foreach( $albums as $album )
		{
			// images
			$imgs = '';
			if ( count($album['images']) > 0 )
			{
				foreach( $album['images'] as $img )
				{
					$img_opts = array(
								'src'=>$img['name'],
								'caption'=>$img['description'],
								'link'=>$album['lgPath'].'/'.$img['name']
								);
					$imgs .= tag('img',$img_opts);
				}
			}
			$album_opts = array(
						  	'id'=>$album['title'],
							'title'=>$album['title'],
							'lgPath'=>$album['lgPath'].'/',
							'description'=>$album['description']
							);
			echo content_tag('album', $imgs, $album_opts);
		}
	}
?>
<?php
/*
For Reference:
	<album id="nature" title="Nature" lgPath="gallery/nature/lg/" tnPath="gallery/nature/tn/" description="Close-up imgs of plant life and insects.">
	<img src="dj052.jpg" caption="This where your photo caption would be" />
	</album>
</gallery>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:element name="gallery">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="album">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="img">
								<xs:complexType>
									<xs:attribute name="src" type="xs:string" />
									<xs:attribute name="caption" type="xs:string" />
									<xs:attribute name="link" type="xs:string" />
									<xs:attribute name="pause" type="xs:string" />
									<xs:attribute name="target" type="xs:string" />
									<xs:attribute name="tn" type="xs:string" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="title" type="xs:string" use="required"/>
						<xs:attribute name="description" type="xs:string" use="required"/>
						<xs:attribute name="lgPath" type="xs:string" use="required"/>
						<xs:attribute name="audio" type="xs:string" />
						<xs:attribute name="audioCaption" type="xs:string" />
						<xs:attribute name="id" type="xs:string" />
						<xs:attribute name="tn" type="xs:string" />
						<xs:attribute name="tnPath" type="xs:string" />
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
*/
?>